<?php
/**
 * Created by JetBrains PhpStorm.
 * User: thanh
 * Date: 4/17/12
 * Time: 12:29 AM
 * To change this template use File | Settings | File Templates.
 */
class FacilityForm extends CFormModel
{
    public $all_teacher;
    public $title;
    public $description;
    public $address;
    public $teacher_id;
    public $status;

    public function rules()
    {
        // NOTE: you should only define rules for those attributes that
        // will receive user inputs.
        return array(
            array('title,all_teacher', 'required'),
            array('teacher_id, status', 'numerical', 'integerOnly' => true),
            array('title, address', 'length', 'max' => 255),
        );
    }

    public function attributeLabels()
    {
        return array(
            'title' => 'Tiêu đề',
            'description' => 'Miêu tả',
            'address' => 'Địa chỉ',
            'all_teacher' => 'Giáo viên giảng dạy',
            'teacher_id' => 'Giáo viên CN',
            'status' => 'Trạng thái',
        );
    }


}
